//
//  BaseVC.h
//  HousingPoliceAssistant
//
//  Created by 云警01 on 2019/6/6.
//  Copyright © 2019 盛洋. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "NavTitleView.h"
#import "baseRefreshFooter.h"
#import "baseRefreshHeader.h"
#import "TopWindow.h"
#import "RequestServices.h"

NS_ASSUME_NONNULL_BEGIN

@interface BaseVC : UIViewController<UITableViewDelegate,UITableViewDataSource,ResquestServicesDelegate>
{
    NavTitleView *titleView;
    UIAlertView *LG_alertview;
    
    //导航右按钮
    UIButton *rightBtn;
    
    UIImageView *backImgView;//基类背景图
}

/**页面暂无数据的文案 不设置时显示暂无数据**/
@property (nonatomic,strong)NSString *NodataStr;
@property (nonatomic,strong)NSString *icon_img;
@property (nonatomic,strong)NSString *icon_width;
@property (nonatomic,strong)NSString *icon_height;
@property (nonatomic,strong)TopWindow *tapview;
@property (nonatomic,strong)NavTitleView *titleView;
@property (copy, nonatomic) void (^backClicked)();
@property (nonatomic,strong)UIImageView *backKuang;//基类背景右边框
@property(nonatomic, strong) UIImageView *backImgView;//基类背景图
@property (nonatomic,strong)UIImageView *backCenterKuang;

/**
 * 跳转下一页
 */
- (void)PushToViewController:(UIViewController*)VC;

/**
 * 添加导航右按钮
 */
- (void)createNavigationBarRightBarButtonItemWithTitle:(NSString *)title font:(CGFloat)font image:(NSString *)image target:(id)target action:(SEL)action;
/**
 * 给导航右按钮设置标题和图片
 */
- (void)SetRightButtonTitle:(NSString *)title image:(NSString *)image;
/**
 * 显示登录界面 1代表直接消失 2代表消失并返回首页
 */
- (void)goLogin:(UIViewController *)ViewController backType:(int)backType animated:(BOOL)animated;

//基类中心背景框
-(void)showBackCenterKuang:(UIImage *)img;

//加载时loading
-(void)ShowLoading;
-(void)ShowLoading:(NSString *)showText;
-(void)HideLoading;
-(BOOL)isLoadingNow;

//提示类信息
-(void)ShowNewMsg:(NSString*)str;
-(void)ShowV3Msg:(NSString*)str;
-(void)ShowV3Msg:(NSString*)str leftBtnTitle:(NSString *)leftTitle rightBtnTitle:(NSString *)rightTitle leftBtnClick:(void(^)())LeftBtnClickBlock rightBtnClick:(void(^)())RightBtnClickBlock;


-(void)ShowNoDataBtnView:(UIView *)view Orgin:(CGFloat)Y Title:(NSString *)Title BtnTitle:(NSString *)BtnTitle;
-(void)ShowNoDataBtnView1:(UIView *)view Orgin:(CGFloat)Y Title:(NSString *)Title BtnTitle:(NSString *)BtnTitle;
-(void)HideNoDataBtnView;
-(void)BtnClicked;

-(void)ShowNoDataView:(UIView *)view Orgin:(CGFloat)Y;
-(void)HideNoDataView;
-(void)ShowerrorView:(UIView *)view Orgin:(CGFloat)Y;
-(void)HideerrorView;
-(void)ScreenBtnClicked;

/// 检查相册访问权限, 如果没有权限将尝试获取权限
- (void)checkPhotoLibraryAuthorization:(void(^)(BOOL isAvalible))completion;

/// 检查相机访问权限
- (BOOL)checkCameraAuthorization;

@end

NS_ASSUME_NONNULL_END
